<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul>
        <!-- <li>小鸡1</li>
        <li>小鸡2</li>
        <li>小鸡3</li> -->
    </ul>
    <script>
        //    var arr=['洗手','下降','数据']
        //    var _html=''
        //    arr.forEach(item=>{
        //       _html +='<li>' + item + '</li>'
        //    })
        //    document.querySelector('ul').innerHTML=_html
        // var arr=[{name:'洗手',age:17}, { name: '下降', age: 16 }, { name: '数据', age: 18 }]
        //  var _html = ''
        //  arr.forEach(item => {
        //      _html += '<li>我叫' + item.name +'今年'+item.age+'岁了</li>'
        //  })
        //   document.querySelector('ul').innerHTML = _html
        var arr = [{ name: '洗手', age: 17 }, { name: '下降', age: 16 }, { name: '数据', age: 18 }]
        var _html = ''
        arr.forEach(item => {
            _html += `<li>我叫${item.name}今年${item.age}岁了</li>`
        })
        document.querySelector('ul').innerHTML = _html
    </script>
</body>

</html>